<template>
  <el-card>
    <el-form label-position="left"label-width="100px">
      <el-row>
        <el-col :span="12">
          <el-form-item label="订单号">
            <label>{{editForm.orderCode}}</label>
          </el-form-item>
          <el-form-item label="金额">
            <label> {{editForm.amount}}</label>
          </el-form-item>
          <el-form-item label="编号">
            <label> {{editForm.code}}</label>
          </el-form-item>
          <el-form-item label="类型">
            <label> {{editForm.subjectText}}</label>
          </el-form-item>
          <el-form-item label="结算编号">
            <label> {{editForm.balanceCode}}</label>
          </el-form-item>
          <el-form-item label="创建时间">
            <label> {{editForm.createdAt}}</label>
          </el-form-item>
          <el-form-item label="结算机构">
            <label> {{editForm.balanceAgency}}</label>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="账号">
            <label> {{editForm.accountCode}}</label>
          </el-form-item>
          <el-form-item label="类型">
            <label> {{editForm.userType}}</label>
          </el-form-item>
          <el-form-item label="城市">
            <label> {{editForm.cityName}}</label>
          </el-form-item>
          <el-form-item label="子账号">
            <label> {{editForm.childAccountCode}}</label>
          </el-form-item>
          <el-form-item label="联系人">
            <label> {{editForm.username}}</label>
          </el-form-item>
          <el-form-item label="备注">
            <label v-if="editForm.remark==null">无</label>
          </el-form-item>
        </el-col>
      </el-row>
      <el-button @click="back()">返回</el-button>
    </el-form>
  </el-card>
</template>
<style>
.el-row {
    margin-bottom: 20px;
  }
  .el-col {
    border-radius: 4px;
  }
  .bg-purple-dark {
    background: #99a9bf;
  }
  .bg-purple {
    background: #d3dce6;
  }
  .bg-purple-light {
    background: #e5e9f2;
  }
  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }
  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }
</style>
<script>

   export default{
    created() {
      this.loadGridData()
    },
    data(){
       return{
         editForm:{
          createdAt:'',
          amount:'',
          code:'',
          subject:'',
          subjectText:'',
          balanceCode:'',
          balanceAgency:'',
          orderCode:'',
          accountCode:'',
          childAccountCode:'',
          username:'',
          userType:'',
          cityName:'',
          remark:''
         },
       }
    },
    methods: {
      loadGridData() {
        let transactionId=this.$route.params.id;
        this.axios.get(`transactions/detail/${transactionId}`).then(response =>{
          this.editForm=response.data
        })
      },
      back(){
        this.$router.push("/transactions")
      }

    }
   }

</script>
